tools/libxl: Fix libxl_list_vcpu() following c/s 93e52d52
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 23 Oct 2014 11:01:15 +0000 (12:01 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 23 Oct 2014 11:29:00 +0000 (12:29 +0100)
My reasoning regarding nr_cpus_out was wrong, as I had confused nr_cpus_out
with nr_vcpus_out.

Dario pointed this out, but the patch (having gained appropriate acks) got
committed before I could post a correction.

Noticed-by: Dario Faggioli <dario.faggioli@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.c

index ee127d8ef0bf2844b6a6a35749911d4ba3c6b257..18561fbe595d153a6a5a1755ee22262c78820677 100644 (file)
@@ -5252,6 +5252,7 @@ libxl_vcpuinfo *libxl_list_vcpu(libxl_ctx *ctx, uint32_t domid,
         return NULL;
     }
 
+    *nr_cpus_out = libxl_get_max_cpus(ctx);
     ret = ptr = libxl__calloc(NOGC, domaininfo.max_vcpu_id + 1,
                               sizeof(libxl_vcpuinfo));